package com.gitee.wsl.reflect.func.library.loader

import com.gitee.wsl.reflect.func.Function2
import com.gitee.wsl.reflect.func.library.Library
import com.gitee.wsl.reflect.func.library.LibraryLoader


/**
 * Creates a library from a single Kotlin function.
 * @see KFunctionAdapter
 */
class FunctionLibraryLoader : LibraryLoader<ExportableFunction> {
    override fun load(source: ExportableFunction) = Library(name = source.name, functions = setOf(Function2(function = source)))
}